<?php
apf_require_controller('Abstract');
class Error_ShowTipsController extends AbstractController {

    public function handle_request() {
        $params = $this->request->get_parameters();
        $status = isset($params['status']) ? intval($params['status']) : 0;
        $code   = !empty($params['code']) ? $params['code'] : 'ERROR_SYSTEM';
        $next   = !empty($params['next']) ? base64_decode($params['next']) : Flow_Urls::base_url();

        $data = array('status' =>$status, 'tip' => Const_Tip::get_tip($code), 'next' => $next);
        $this->request->set_attribute('data', $data);

        return "Error_ShowTips";
    }
}